﻿using System;
using System.AutoUpdate.Core;
using System.AutoUpdate.Library;
using System.AutoUpdate.Tools;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.AutoUpdate.Interfaces
{
    public interface IUpdateSource
    {
        //
        // Version parser
        //

        IVersionParser VersionParser
        {
            get;
            set;
        }

        event TransferEventHandler TransferStarted;
        event TransferEventHandler TransferProgressChanged;
        event TransferEventHandler TransferEnded;

        List<UpdateVersionInfo> GetVersions ();

        bool HasVersion (UpdateVersionInfo info);
        void Transfer (UpdateVersionInfo info);

        bool CheckSignature (UpdateVersionInfo info, bool online = false);
    }
}
